<!--

    CODENVY CONFIDENTIAL
    __________________

     [2015] - [2016] Codenvy, S.A.
     All Rights Reserved.

    NOTICE:  All information contained herein is, and remains
    the property of Codenvy S.A. and its suppliers,
    if any.  The intellectual and technical concepts contained
    herein are proprietary to Codenvy S.A.
    and its suppliers and may be covered by U.S. and Foreign Patents,
    patents in process, and are protected by trade secret or copyright law.
    Dissemination of this information or reproduction of this material
    is strictly forbidden unless prior written permission is obtained
    from Codenvy S.A..

-->
<div class="left-sidebar-container" id="navbar">
  <md-toolbar class="flex-shrink-none">
    <md-progress-linear md-mode="indeterminate" ng-hide="codenvyNavbarController.profile"></md-progress-linear>
    <div ng-show="codenvyNavbarController.profile" layout="column" flex>

      <div flex="none" layout="row" layout-align="start center">
        <section class="navbar-top-logo logo-color-white" layout="column" layout-align="center left"
                 ng-include="branding.logoText">
        </section>
        <div flex></div>
        <navbar-notification id="navbar-notification-container"></navbar-notification>
      </div>

      <md-divider md-theme="factory-theme"></md-divider>

      <div class="admin-navbar-menu">
        <section class="left-sidebar-menu" layout="column" layout-align="center center">
          <md-list layout="column">
            <md-list-item flex class="navbar-subsection-item"
                          ng-show="codenvyNavbarController.displayLoginItem">
              <md-button nav-bar-selected flex href="{{codenvyNavbarController.menuItemUrl.login}}" layout-align="left">
                <div class="navbar-item" layout="row" layout-align="start center">
                  <i class="fa fa-user navbar-icon">&nbsp;</i>
                  <span>Login</span>
                </div>
              </md-button>
            </md-list-item>
            <md-list-item flex class="navbar-subsection-item">
              <md-button nav-bar-selected flex che-reload-href
                         href="{{codenvyNavbarController.menuItemUrl.dashboard}}" layout-align="left"
                         target="_self">
                <div class="navbar-item" layout="row" layout-align="start center" id="navbar-dashboard-item">
                  <md-icon md-font-icon="navbar-icon chefont cheico-dashboard" aria-label="Dashboard"></md-icon>
                  <span>Dashboard</span>
                </div>
              </md-button>
            </md-list-item>
            <md-list-item flex class="navbar-subsection-item">
              <md-button nav-bar-selected flex che-reload-href
                         href="{{codenvyNavbarController.menuItemUrl.workspaces}}" layout-align="left">
                <div class="navbar-item" layout="row" layout-align="start center" id="navbar-workspaces-item">
                  <md-icon md-font-icon="navbar-icon chefont cheico-workspace"></md-icon>
                  <span>Workspaces</span>
                  <span class="navbar-number" ng-show="codenvyNavbarController.getWorkspacesNumber()">&nbsp;({{codenvyNavbarController.getWorkspacesNumber()}})</span>
                </div>
              </md-button>
            </md-list-item>
            <md-list-item flex class="navbar-subsection-item">
              <md-button nav-bar-selected flex che-reload-href
                         href="{{codenvyNavbarController.menuItemUrl.stacks}}" layout-align="left">
                <div class="navbar-item" layout="row" layout-align="start center" id="navbar-stacks-item">
                  <i class="fa fa-archive navbar-icon" aria-hidden="true"></i>
                  <span>Stacks</span>
                </div>
              </md-button>
            </md-list-item>
            <md-list-item flex class="navbar-subsection-item" ng-if="codenvyNavbarController.isFactoryServiceAvailable">
              <md-button nav-bar-selected flex che-reload-href
                         href="{{codenvyNavbarController.menuItemUrl.factories}}" layout-align="left">
                <div class="navbar-item" layout="row" layout-align="start center" id="navbar-factories-item">
                  <md-icon md-font-icon="navbar-icon chefont cheico-factory"></md-icon>
                  <span>Factories</span>
                  <span class="navbar-number" ng-show="codenvyNavbarController.getFactoriesNumber()">&nbsp;({{codenvyNavbarController.getFactoriesNumber()}})</span>
                </div>
              </md-button>
            </md-list-item>
            <md-list-item flex class="navbar-subsection-item" ng-if="!codenvyNavbarController.userServices.hasAdminUserService && !codenvyNavbarController.hasPersonalAccount">
              <md-button nav-bar-selected flex che-reload-href
                         href="{{codenvyNavbarController.menuItemUrl.organizations}}" layout-align="left">
                <div class="navbar-item" layout="row" layout-align="start center" id="navbar-organizations-item">
                  <md-icon md-font-icon="fa navbar-icon fa-sitemap"></md-icon>
                  <span>Organizations</span>
                  <span class="navbar-number" ng-show="codenvyNavbarController.getOrganizationsNumber()">&nbsp;({{codenvyNavbarController.getOrganizationsNumber()}})</span>
                </div>
              </md-button>
            </md-list-item>
          </md-list>
        </section>
      </div>
      <div class="admin-navbar-menu"
           ng-if="codenvyNavbarController.userServices.hasInstallationManagerService || codenvyNavbarController.userServices.hasAdminUserService">
        <section class="left-sidebar-menu" layout="column" layout-align="start start">

          <div class="navbar-section"
               flex layout="row" layout-align="start start">
            <span flex class="navbar-section-title">Administration</span>
          </div>
          <md-list layout="column">
            <md-list-item flex class="navbar-subsection-item"
                          ng-if="codenvyNavbarController.userServices.hasAdminUserService">
              <md-button nav-bar-selected flex che-reload-href
                         href="{{codenvyNavbarController.menuItemUrl.usermanagement}}"
                         layout-align="left">
                <div class="navbar-item" layout="row" layout-align="start center">
                  <i class="fa fa-user fa-lg navbar-icon"></i>
                  <span>Users</span>
                </div>
              </md-button>
            </md-list-item>
            <md-list-item flex class="navbar-subsection-item" ng-if="codenvyNavbarController.userServices.hasAdminUserService">
              <md-button nav-bar-selected flex che-reload-href
                         href="{{codenvyNavbarController.menuItemUrl.organizations}}" layout-align="left">
                <div class="navbar-item" layout="row" layout-align="start center">
                  <md-icon md-font-icon="fa navbar-icon fa-sitemap"></md-icon>
                  <span>Organizations</span>
                  <span class="navbar-number" ng-show="codenvyNavbarController.getRootOrganizationsNumber()">&nbsp;({{codenvyNavbarController.getRootOrganizationsNumber()}})</span>
                </div>
              </md-button>
            </md-list-item>
          </md-list>
        </section>
      </div>

      <navbar-recent-workspaces></navbar-recent-workspaces>
      <navbar-teams flex layout="column" layout-aling="start strength"></navbar-teams>

      <div class="admin-navbar-menu">
        <section class="left-sidebar-menu navbar-account-section">
          <md-list layout="column" flex>

            <md-list-item class="navbar-subsection-item">
              <navbar-dropdown-menu flex
                                    navbar-dropdown-items="codenvyNavbarController.accountItems"
                                    navbar-dropdown-offset="15 -85">
                <md-button ng-href="" layout-align="left">
                  <div class="navbar-item navbar-identity" layout="row" layout-align="start center">

                    <i class="navbar-icon" flex="none">
                      <img class="developers-face" gravatar-src="codenvyNavbarController.profile.email"/>
                    </i>
                    <span flex style="text-align: left;">{{codenvyNavbarController.getUserName()}}</span>
                    <i class="fa fa-angle-up navbar-icon" aria-hidden="true"></i>
                  </div>
                </md-button>
              </navbar-dropdown-menu>
            </md-list-item>
          </md-list>
        </section>
      </div>

    </div>
  </md-toolbar>

  <div class="navbar-iframe-button-left-border" ng-show="showIDE"></div>

</div>
